/*
 * @Author: cooper
 * @Date: 2024-03-28 08:55:46
 * @Wechat: cmd_develop
 * @Description:
 */
#ifndef __USART_H
#define __USART_H

#include "at32f435_437.h"

#define USARTX USART1

#define USART_TX_PIN GPIO_PINS_9
#define USART_TX_GPIO GPIOA

#define USART_RX_PIN GPIO_PINS_10
#define USART_RX_GPIO GPIOA

#define USART_GPIO_CRM_CLK CRM_GPIOA_PERIPH_CLOCK

#define USART_CRM_CLK CRM_USART1_PERIPH_CLOCK

#define USART_TX_PIN_MUX_NUM GPIO_MUX_7
#define USART_RX_PIN_MUX_NUM GPIO_MUX_7

#define USART_TX_PIN_SOURCE GPIO_PINS_SOURCE9
#define USART_RX_PIN_SOURCE GPIO_PINS_SOURCE10

#define USARTX_IRQn USART1_IRQn
#define USARTX_IRQHandler USART1_IRQHandler
/*器件电子签名UID*/
extern char UID[25];
void usart_Init(void);
void UID_Init(void);
#endif
